<template lang="pug">
.pie-chart.app-container
  #pie-chart
</template>

<script setup>
import { pieChart, destroyPieChart } from '@/views/EChartsMage/echarts'

import { reactive, getCurrentInstance, onMounted, onUnmounted } from 'vue'

const { proxy } = getCurrentInstance() // 内部组件实例

// 数据
const state = reactive({
})

onMounted(() => {
  console.log(1)
  // 初始化饼图
  pieChart()
})

onUnmounted(() => {
  // 销毁
  destroyPieChart()
})
</script>

<style lang="scss">
  #pie-chart {
    width: 110%;
    max-width: 600px;
    height: 150px;
  }
</style>
